<%@ Page Language="C#" MasterPageFile="~/PgMaster.master" AutoEventWireup="true" CodeFile="ChartAndReport.aspx.cs" Inherits="ChartAndReport" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script type="text/javascript" src="FusionCharts/FusionCharts.js" language="javascript"></script>
<script language="javascript" type="text/javascript">
function toggle(showHideDiv, switchImgTag) {
        var ele = document.getElementById(showHideDiv);
        var imageEle = document.getElementById(switchImgTag);
        if(ele.style.display == "block") {
                ele.style.display = "none";
		imageEle.innerHTML = '<img src="images/plus.png">';
        }
        else {
                ele.style.display = "block";
                imageEle.innerHTML = '<img src="images/minus.png">';
        }
}
  function open_piechart(project, release,pageopt) {
        var pieurl = "piechart.aspx?project=" + project + "&release=" + release + "&pt=" + pageopt;
        showPopWin(pieurl,800, 500, null); 
        return false;
    }
function checkAllProject(obj1)
{
    var checkboxCollection = document.getElementById('<%=cbProjects.ClientID %>').getElementsByTagName('input');
           
    for(var i=0;i<checkboxCollection.length;i++)
    {
        if(checkboxCollection[i].type.toString().toLowerCase() == "checkbox")
        {
            checkboxCollection[i].checked = obj1.checked;
        }
    }
}

function checkAllDefects(obj1)
{
    var checkboxCollection = document.getElementById('<%=cbDefectReason.ClientID %>').getElementsByTagName('input');
           
    for(var i=0;i<checkboxCollection.length;i++)
    {
        if(checkboxCollection[i].type.toString().toLowerCase() == "checkbox")
        {
            checkboxCollection[i].checked = obj1.checked;
        }
    }
}
</script>

<!-- top Frame-->
<div style=" float:left; width:880px; padding:5px;">
<div style="height:30px; width:880px">
<div style="background-image: url(Images/rhm1_l.gif); background-repeat: no-repeat; height:30px; width:15px; float:left"></div>
<div style="background-image: url(Images/rhm1_bg.gif); background-repeat:repeat-x; height:30px; width:850px; float:left">
<div style="margin-top:5px; margin-left:10px; font-family: Arial; color: white; font-weight: bold;">
Select Release</div>
</div>
<div style="background-image: url(Images/rhm1_r.gif); background-repeat: no-repeat; height:30px;width:15px; float:left"></div>
</div>
<div style="border-bottom: #dcdcdc 1px solid; border-left: #dcdcdc 1px solid; border-top: #dcdcdc 1px solid; border-right: #dcdcdc 1px solid; height:50px; width:878px">
<div style="width:880px; float:left; padding-top:10px">
<div style="width:200px; float:left;">
   <asp:DropDownList ID="ddlRelease" runat="server" OnSelectedIndexChanged="getProjects" AutoPostBack="True" Width="150px" AppendDataBoundItems="true">
        <asp:ListItem Value="-1">Choose</asp:ListItem>
   </asp:DropDownList>
   </div>
   <div style=" width:220px; float:left;">
    Start Date:
   <asp:DropDownList ID="ddlStartDate" runat="server" Width="120px">
   </asp:DropDownList>
   </div>
   <div style="width:220px; float:left;">
    End Date:
   <asp:DropDownList ID="ddlEndDate" runat="server"  Width="120px">
   </asp:DropDownList>
   </div>
   <div style="float:right; width:50px ">
 <asp:ImageButton ID="ibHideShowDiv" runat="server" ImageUrl="images/minus.png" OnClick="ImageButton1_Click" />
 </div>
 </div> 
 
</div>
</div>

<div class="formSeperater"></div>
<!-- container start-->
<div id="divContainer" style="margin:0 auto; padding:5px;" runat="server" visible="false">
<!--Frame1 start-->
<div style=" width:880px; float:left;">
<div style=" float:left; width:880px; float:left; border: #dcdcdc 1px solid;">
<div style="height:30px; width:880px;border-bottom: #dcdcdc 1px solid; ">
<div style="font-family: Arial; color: white; font-weight: bold; width:880px; background-color: #696969; height:30px">
<div style=" padding-top:8px; padding-left:20px">
Select Project
</div>
</div>
</div>
<div style="width:880px; float:left; height:160px; padding-top:5px">
  <asp:Panel ID="pnlProject" runat="server" >      
   <fieldset>
    <asp:Panel ID="pnlDR" runat="server" Visible="true" Width="865px" Height="150px" ScrollBars="Vertical">
    <table>
            <tr>
            </tr>
            <tr><td>
            <asp:CheckBox ID="CheckAllProject" runat="server" Text="Select All" Font-Size="10pt" ForeColor="Red" />
            </td></tr>
        <tr>
            <td>               
               <asp:CheckBoxList ID="cbProjects" runat="server" RepeatColumns="3" Width="820px"></asp:CheckBoxList>       
            </td>
        </tr>
        </table>
       </asp:Panel>
    </fieldset>   
     </asp:Panel>  
</div>                                            
</div>
<!--Frame1 end-->
<div style=" height:10px; width:880px; float:left"></div>
<!--Frame 2 start-->
<div style="float:left; width:880px;">
<div style=" float:left; width:880px; float:left; border: #dcdcdc 1px solid;">
<div style="height:30px; width:880px;border-bottom: #dcdcdc 1px solid; ">
<div style="font-family: Arial; color: white; font-weight: bold; width:880px; background-color: #696969; height:30px">
<div style=" padding-top:8px; padding-left:20px">
Select Test Phases
</div>
</div>
</div>
<div style="width:880px; float:left; height:40px; padding-top:5px">
<asp:Panel ID="pnlTestCasePhase" runat="server" Visible="true" Width="880px">       
   <asp:RadioButtonList ID="rbTestCasePhase" runat="server" RepeatDirection="Horizontal" >
            <asp:ListItem Value="d - System Test">Systest</asp:ListItem>
            <asp:ListItem Value="g - UAT">UAT</asp:ListItem>
            <asp:ListItem Value="e - SIT">SIT</asp:ListItem>
    </asp:RadioButtonList>       
    </asp:Panel>
</div>
</div>
</div>

<!--Frame2 end-->
<div style=" height:10px; width:880px; float:left"></div>
<!--Frame 3 start-->
<div style="float:left; width:880px">
<div style=" float:left; width:880px; float:left; border: #dcdcdc 1px solid;">
<div style="height:30px; width:880px;border-bottom: #dcdcdc 1px solid; ">
<div style="font-family: Arial; color: white; font-weight: bold; width:880px; background-color: #696969; height:30px">
<div style=" padding-top:8px; padding-left:20px">
Select Invalid Defect Reason Against Test Phases
</div>
</div>
</div>
<div style="width:880px; float:left; height:150px; padding-top:5px">
   <asp:Panel ID="pnlDefectReason" runat="server" Visible="true" Width="880px">        
        <div style="width:160px; float:left; height:150px">
        <asp:RadioButtonList ID="rbDefectReason" runat="server" OnSelectedIndexChanged="rbDefectReason_CheckedChanged" AutoPostBack="True">
                <asp:ListItem Value="d - System Test">Systest</asp:ListItem>
                <asp:ListItem Value="g - UAT">UAT</asp:ListItem>
                <asp:ListItem Value="e - SIT">SIT</asp:ListItem>
        </asp:RadioButtonList>   
        </div> 
       <div style="width:700px; float:left; height:auto">
        <asp:Panel id="pnlCBdefectReason" runat="server" Width="650px" Height="150px" ScrollBars="Vertical">
          <asp:CheckBox ID="CheckAllDefectReason" runat="server" Text="Select All" Font-Size="10pt" ForeColor="Red" />
          <asp:CheckBoxList ID="cbDefectReason" runat="server" Visible="false" RepeatColumns="3"/>
        </asp:Panel>
       </div>   
    </asp:Panel>
</div>
</div>
</div>
</div>

<!--Frame3 end-->
<%--</div>--%>
<div style="width:750px; float:left; margin-left: 10px; padding:5px;">
        <asp:Panel ID="pnlButtonForChart" runat="server">   
        <asp:Button ID="btnCreateChart" runat="server" Text="Generate Chart" OnClick="btnCreateChart_Click"/>    
    </asp:Panel>
</div>
</div>
<div style=" height:10px; width:880px; float:left"></div>
<!--Chart in tabular form-->
<div style="width:880px; float:left; padding:5px; border: #dcdcdc 1px solid;">
<asp:Panel runat="server" ID="pnlChatMenu" OnLoad="pnlLoad">
<asp:Menu
        id="MenuChart"
        Orientation="Horizontal"
        StaticMenuItemStyle-CssClass="tab"
        StaticSelectedStyle-CssClass="selectedTab"
        CssClass="tabs"
        OnMenuItemClick="MenuChart_MenuItemClick"
        Runat="server" BackColor="#FFFBD6" DynamicHorizontalOffset="2" Font-Names="Verdana" Font-Size="0.8em" ForeColor="#990000" StaticSubMenuIndent="10px">
        <Items>
        <asp:MenuItem Text="Projects" Value="0" Selected="True" />
        <asp:MenuItem Text="Test Phase" Value="1" />
        <asp:MenuItem Text="Invalid Defect Reason" Value="2" />
        </Items>    
    <StaticSelectedStyle CssClass="selectedTab" BackColor="#FFCC66" />
    <StaticMenuItemStyle CssClass="tab" HorizontalPadding="5px" VerticalPadding="2px" />
    <DynamicHoverStyle BackColor="#990000" ForeColor="White" />
    <DynamicMenuStyle BackColor="#FFFBD6" />
    <DynamicItemTemplate>
        <%# Eval("Text") %>
    </DynamicItemTemplate>
    <DynamicSelectedStyle BackColor="#FFCC66" />
    <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
    <StaticHoverStyle BackColor="#990000" ForeColor="White" />
    </asp:Menu>   
    <div class="tabContents">
    <asp:MultiView
        id="MultiView_Chart"
        ActiveViewIndex="0"
        Runat="server">
        <asp:View ID="View_Projects" runat="server">
         <asp:Literal ID="fcLiteral" runat="server"></asp:Literal>
         <div id="divtblproj" runat="server"></div> 
        </asp:View>        
        <asp:View ID="View_TestPhase" runat="server">
        <asp:Literal ID="litTestPhase" runat="server"></asp:Literal>
         <div id="divth" runat="server"></div> 
        </asp:View>        
        <asp:View ID="View_DefectReason" runat="server">
         <asp:Literal ID="litDefectReson" runat="server"></asp:Literal>
         <div id="divDR" runat="server"></div> 
        </asp:View>        
    </asp:MultiView>
    
    </div>
    
    </asp:Panel>
</div>

<!-- container end-->
</asp:Content>

